<?php $this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Profile");
$this->breadcrumbs=array(
	UserModule::t("Profile")=>array('profile'),
	UserModule::t("Edit"),
);
$acc = UserModule::isAdmin();
?>
<div class="single-head">
	<h3 class="pull-left"><i class="fa fa-desktop purple"></i> <?php echo UserModule::t('Manage profile'); ?></h3>
	<div class="breads pull-right">
		<strong>Nav</strong> : <a href="<?php echo Yii::app()->createUrl('user/profile'); ?>">Home</a>  / Manage Profile  
	</div>
	<div class="clearfix"></div>
</div>
<?php if(Yii::app()->user->hasFlash('profileMessage')): ?>
<div class="success">
<?php echo Yii::app()->user->getFlash('profileMessage'); ?>
</div>
<?php endif; ?>
<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'login-form',
    'type'=>'horizontal',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<p class="note"><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></p>

	<?php echo $form->errorSummary(array($model,$profile)); ?>

	<?php echo $form->textFieldRow($profile,'firstname',array('class'=>'form-control span5')); ?>
	<?php echo $form->textFieldRow($profile,'lastname',array('class'=>'form-control span5')); ?>
	<?php echo $form->textFieldRow($model,'username',array('class'=>'form-control span5')); ?>
	<?php echo $form->textFieldRow($model,'email',array('class'=>'form-control span3')); ?>
	<?php echo $form->dropDownListRow($profile,'org_typeId',CHtml::listData(OrgType::model()->findAll(), 'id', 'name'),array('class'=>'span3 form-control','empty'=>'--Select Organisation--')); ?>
	<?php //echo $form->dropDownListRow($profile,'legal_statusId',CHtml::listData(LegalStatus::model()->findAll(), 'id', 'name'),array('class'=>'span3 form-control','empty'=>'--Select Legal Status--')); ?>
	<?php echo $form->textFieldRow($profile,'org_name' ,array('class'=>'span3 form-control')); ?>
	<?php echo $form->textAreaRow($profile,'org_desc' ,array('class'=>'span4 form-control')); ?>
	<?php echo $form->textFieldRow($profile,'web_url' ,array('class'=>'span6 form-control')); ?>
	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType'=>'submit',
            'type'=>'primary',
            'label'=>'Save',
        )); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
